const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electronAPI', {
  // 通过IPC调用主进程处理剪贴板
  copyFileToClipboard: (filePath) => 
    ipcRenderer.invoke('copy-file-to-clipboard', filePath),
  
  // IPC通信方法保持不变
  toInstall: () => ipcRenderer.invoke('install'),
  onUpdate: (callback) => ipcRenderer.on('update', callback),
  onDownloaded: (callback) => ipcRenderer.on('downloaded', callback)
});